/**
 * File name:      CustomMultiPartRequest.java
 * Date:           2013-5-22
 * Description:    // 用于详细说明此程序文件完成的主要功
 *                 // 能与其他模块或函数的接口，输出值、
 *                 // 取值范围、含义及参数间的关系
 * Modify History:     Date             Programmer       Notes
 *                    ---------        ---------------  ---------
 *                    2013-5-22            胡少磊                           Initial
 **********************************************************************/
package com.wy.framework.filters;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest;

/**
 * Created on 2013-5-22
 * <p>Title:       [模块名]</p>
 * <p>Description: 对文件上传做特殊处理</p>
 * @version        1.0
 */
public class CustomMultiPartRequest extends JakartaMultiPartRequest {

	/**
	 * 与struts.xml保持同步
	 */
	private String fileUpload = "json/fileUpload";
	
	@Override
	public void parse(HttpServletRequest request, String saveDir)
			throws IOException {
		if (!request.getRequestURI().endsWith(fileUpload)) {
			super.parse(request, saveDir);
		}
	}
}
